#第一阶段
FROM node:alpine as BUILD
WORKDIR /usr/src/app
RUN mkdir -p /usr/src/app
ADD . /usr/src/app
RUN npm install && npm run build

#第二阶段
FROM nginx:1.15.10-alpine
MAINTAINER guonl <guonianlei@126.com>
COPY --from=BUILD /usr/src/app/build /usr/share/nginx/html
ADD nginx.conf /etc/nginx/conf.d/default.conf
